package com.example.hello.authentication;

import lombok.Data;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * <p>
 * JSON Web Token
 * </p>
 *
 * @author 12071
 * @date 2022/7/27 10:52
 */
@Data
public class JWTToken implements AuthenticationToken {
    private static final long serialVersionUID = 1282057025599826155L;
    private String token;

    /**
     * 到期时间
     */
    private String exipreAt;

    public JWTToken(String token) {
        this.token = token;
    }

    public JWTToken(String token, String exipreAt) {
        this.token = token;
        this.exipreAt = exipreAt;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
